// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 积分兑换物品 POST /api/user/exchange */
export async function exchangeItemUsingPost(
  body: API.ItemExchangeRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/exchange", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户登录 POST /api/user/login */
export async function userLoginUsingPost(
  body: API.UserLoginInfoRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLoginUserInfoVO_>("/api/user/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 退出登录 POST /api/user/logout */
export async function userLogoutUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>("/api/user/logout", {
    method: "POST",
    ...(options || {}),
  });
}

/** 用户注册 POST /api/user/register */
export async function userRegisterUsingPost(
  body: API.UserRegisterRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/user/register", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 重置密码 POST /api/user/resetPassword */
export async function resetPasswordUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.resetPasswordUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/resetPassword", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 发送注册验证码 POST /api/user/send */
export async function saveUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.saveUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>("/api/user/send", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 发送重置密码验证码 POST /api/user/sendResetCode */
export async function sendResetCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.sendResetCodeUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>("/api/user/sendResetCode", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 积分排序 POST /api/user/SortPoints */
export async function sortPointsUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListUserInfo_>("/api/user/SortPoints", {
    method: "POST",
    ...(options || {}),
  });
}

/** 修改用户 POST /api/user/updateUser */
export async function updateUserUsingPost(
  body: API.UserInfoRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserInfo_>("/api/user/updateUser", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 验证重置密码验证码 POST /api/user/verifyResetCode */
export async function verifyResetCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.verifyResetCodeUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/verifyResetCode", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
